// import "./common/ployfill"    // 去除浏览器报错
import { createApp } from "vue";
import ElementPlus from "element-plus";
import { baidu } from "./utils/system/statistics";
import "element-plus/theme-chalk/index.css";
import "element-plus/theme-chalk/display.css"; // 引入基于断点的隐藏类
import "normalize.css"; // css初始化
import "./assets/style/common.scss"; // 公共css
import 'default-passive-events'

import App from "./App.vue";
import store from "./store";
import router from "./router";
import i18n from "./locale";

// import { createI18n } from "vue-i18n";

// 全局样式
import "./styles/index.less";
import iconPark from "./plugin/icon-park";
// if (import.meta.env.MODE !== 'development') { // 非开发环境调用百度统计
//   baidu()
// }

// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
// const app = createApp(App);
//
iconPark(app);
app.use(ElementPlus, {
  size: store.state.app.elementSize,
  i18n: i18n.global.t
});
app.use(store);
app.use(router);
app.use(i18n);
// app.config.performance = true
app.mount("#app");
